How to get the object list I just saved?

I'm doing some OSLC developing job with DOORS.

 

Now I want to set up a trigger when clients press the 'Save' button. The trigger will sent me the list of the objects just saved so that my OSLC application can continue to work.

 

For example, there are 10 objects in a module. I only modified object 2 and object 10 then pressed 'Save' button. I think that DOORS should know which object I have changed and DOORS would just deal with object 2 and 10.

 

How to get the object list?


leoxiong - Wed Jun 24 01:30:09 EDT 2015

Re: How to get the object list I just saved?
Richard_Hesketh - Wed Jul 22 05:16:20 EDT 2015

There doesn't seem to be a very efficient way. The modified function only identifies objects modified since last baseline, and there is no known (documented or otherwise) equivalent for unsaved changes.

The code below is the most optimal method I could come up with in a few minutes of thinking about the problem. Hope it helps:

bool blDEBUG = true // Set false to get rid of print statements

Module  modCurr = current
Object  objCurr
HistorySession hs
History hrObj
Date    dtLastOpened, dtObjLastModified
Skip    skModifiedObjects = createString

if (unsaved modCurr)
{
    for hs in modCurr do
        { dtLastOpened = when(hs) }
    
    if (blDEBUG)
        { print "Module last opened: " dtLastOpened "\n" }
    
    for objCurr in entire modCurr do // Entire, because we want to know about deleted objects
    {
        if (modified objCurr) // Only bother to look at objects changed since last baseline - an optimisation
        {
            for hrObj in objCurr do
                { dtObjLastModified = hrObj.date }
            if (dtObjLastModified > dtLastOpened)
            {
                put (skModifiedObjects, identifier objCurr, objCurr) // Put Object ID in skiplist as string key, Object as data
            }
        }
    }
    
    if (blDEBUG)
    {
        for objCurr in skModifiedObjects do
            { print "  Object " (string key skModifiedObjects) " (" (number objCurr) ") was modified.\n" }
    }
    
    /*
        Now, do something with the skip list, before deleting it...
    */
}

delete skModifiedObjects